package com.supply.dl.activity.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.supply.dl.R;
import com.supply.dl.view.LoginOutDialog;
import com.supply.dl.widget.LoadTipFailedLayout;

import butterknife.BindView;

public class MeFragment extends ViewPagerFragment implements View.OnClickListener {
    @BindView(R.id.layout_load_failed)
    public LoadTipFailedLayout loadTipFailedLayout;

    @BindView(R.id.layout_login_out)
    public LinearLayout layoutLoginOut;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.supply_me_layout, null);
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        //在这里初始UI组件
//		loadTipFailedLayout.setRestartOnClickListener(this);
//		loadTipFailedLayout.setLoadText(getString(R.string.since_help_loading));
//		loadTipFailedLayout.setNormalText(R.string.since_help_loading_finish);
//		loadTipFailedLayout.setState(LoadTipFailedLayout.STATE_PROGRESS);
        layoutLoginOut = (LinearLayout) view.findViewById(R.id.layout_login_out);
        layoutLoginOut.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.layout_login_out:
                LoginOutDialog loginOutDialog = new LoginOutDialog(mActivity);
                loginOutDialog.show();
                break;
            default:
                break;
        }
    }
}
